<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page errorPage="../error/404.jsp"%>
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<title>会员中心</title>
<%@ include file="common/head.jsp" %>
</head>

<body class="user-select">
<section class="container-fluid">
  <header>
    <nav class="navbar navbar-default navbar-fixed-top">
      <div class="container-fluid">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false"> <span class="sr-only">切换导航</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button>
          <a class="navbar-brand" href="/member/page/main.html">MEMBER</a> </div>
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
          <ul class="nav navbar-nav navbar-right">  

            <li class="dropdown"> 
            <a class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">${user.nickname}<span class="caret"></span></a>
            
              <ul class="dropdown-menu dropdown-menu-left">
                <li><a title="查看或修改个人信息" data-toggle="modal" data-target="#seeUserInfo">个人信息</a></li>
                <li><a title="查看您的登录记录" data-toggle="modal" data-target="#seeUserLoginlog">登录记录</a></li>
              </ul>
            </li>
            <li><a href="/member/page/logout.html" onClick="if(!confirm('是否确认退出？'))return false;">退出登录</a></li>
                   </ul>
     
        </div>
      </div>
    </nav>
  </header>
  <div class="row">
    <aside class="col-sm-3 col-md-2 col-lg-2 sidebar">
      <ul class="nav nav-sidebar">
        <li class="active"><a href="report.html" target="fre">用户信息</a></li>
      </ul>
      <ul class="nav nav-sidebar">     
   
         <li><a class="dropdown-toggle" id="otherMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">账号</a>
        	<ul class="dropdown-menu" aria-labelledby="otherMenu">
            <li><a href="/member/page/memberinfo.html" target="fre">修改资料</a></li>      

        	</ul>
        </li>
  

      </ul>

      <ul class="nav nav-sidebar">
        <li><a class="dropdown-toggle" id="userMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">财务</a>
          <ul class="dropdown-menu" aria-labelledby="userMenu">    
           
            <li><a href="/member/page/buyCredtis.html" target="fre">在线支付</a></li>
        <li><a href="/member/page/QueryOrder.html" target="_blank">订单查询</a></li> 
         <li><a href="/member/page/buycopun.html" target="fre">在线支付</a></li>  
         <li><a href="/member/page/WeixinPay.html" target="_blank">微信支付</a></li>   
            
           
          </ul>
        </li> 
      </ul>
    </aside>
    
    
    
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-lg-10 col-md-offset-2 main" id="main">
<iframe name="fre" src="/member/page/report.html" width="1110" height="800" class="fre"></iframe>
        
        </div>
   	
  </div>
</section>
<!--个人信息模态框-->
<div class="modal fade" id="seeUserInfo" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <form  >
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
          <h4 class="modal-title" >个人信息</h4>
        </div>
        <div class="modal-body">
          <table class="table" style="margin-bottom:0px;">
            <thead>
              <tr> </tr>
            </thead>
            <tbody>
              <tr>
                <td wdith="20%">姓名:<input type="hidden" value="${user.uid}" class="form-control" name="uid" maxlength="10" autocomplete="off" id="uid" /></td>
                <td width="80%"><input type="text" value="${user.nickname}" class="form-control" name="nickname" maxlength="10" autocomplete="off" id="nickname" onblur="checkNickName()"/></td>
              </tr>
              <tr>
                <td wdith="20%">用户名:</td>
                <td width="80%"><input type="text" value="${user.username}" class="form-control" name="username" maxlength="10" autocomplete="off" id="username" onblur=" checkUserName()"/></td>
              </tr>
              <tr>
                <td wdith="20%">电话:</td>
                <td width="80%"><input type="text" value="${user.telphone}" class="form-control" name="telphone" maxlength="13" autocomplete="off"  id="telphone" onblur="checkTelPhone()"/></td>
              </tr>
              <tr>
                <td wdith="20%">旧密码:</td>
                <td width="80%"><input type="password" value="${user.password}" class="form-control" name="old_password" maxlength="18" autocomplete="off" id="old_password"/></td>
              </tr>
              <tr>
                <td wdith="20%">新密码:</td>
                <td width="80%"><input type="password" class="form-control" name="password" maxlength="18" autocomplete="off"  id="password"/></td>
              </tr>
              <tr>
                <td wdith="20%">确认密码:</td>
                <td width="80%"><input type="password" class="form-control" name="new_password" maxlength="18" autocomplete="off" id="new_password" onblur="checkPassWord()"/></td>
              </tr>
            </tbody>
            <tfoot>
              <tr></tr>
            </tfoot>
          </table>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
          <button type="button" class="btn btn-primary" onclick="updateUserInfo()">提交</button>
        </div>
      </div>
    </form>
  </div>
</div>
<!--个人登录记录模态框-->
<div class="modal fade" id="seeUserLoginlog" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" >登录记录</h4>
      </div>
      <div class="modal-body">
          <table class="table" style="margin-bottom:0px;">
            <thead>
              <tr>
                <th>用户名</th>
                <th>登录时间</th>
                <th>登录IP</th>
              </tr>
            </thead>
            <tbody>
            <c:forEach items="${log}" var="l" begin="0" end="3">
              <tr>
                <td>${l.username}</td>
                <td><fmt:formatDate value="${l.createTime}" pattern="yyyy-MM-dd  HH:mm:ss"/></td>
                <td>${l.ip}</td>
              </tr>
             </c:forEach>
            </tbody>
          </table>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">朕已阅</button>
      </div>
    </div>
  </div>
</div>













  
  
  







</body>
<script type="text/javascript" src="/js/membermain/personinfo.js"></script>
<script type="text/javascript" src="/js/membermain/personLog.js"></script>
</html>
